<?php

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'item.cancel' || document.formvalidator.isValid(document.id('item-form')))
		{
			<?php echo $this->form->getField('description')->save(); ?>
			Joomla.submitform(task, document.getElementById('item-form'));
		}
	}

</script>

<form action="<?php echo JRoute::_('index.php?option=com_bakerys&view=orders&layout=edit&id='.(int) $this->order->id); ?>" method="post" name="adminForm" id="item-form" class="form-validate">
	<div class="row-fluid">
		<div class="span12 form-horizontal">
			<div class="control-group">
				<div class="control-label"><?php echo $this->form->getLabel('Customer Name'); ?></div>
				<div class="controls"><?php echo $this->form->getInput('customer_name'); ?></div>
			</div>										
			<div class="control-group">
				<div class="control-label"><?php echo $this->form->getLabel('order_date'); ?></div>
				<div class="controls"><?php echo $this->form->getInput('order_date'); ?></div>
			</div>				
			<div class="control-group">
				<div class="control-label"><?php echo $this->form->getLabel('total_amount'); ?></div>
				<div class="controls"><?php echo $this->form->getInput('total_amount'); ?></div>
			</div>				
			<div class="control-group">
				<div class="control-label"><?php echo $this->form->getLabel('description'); ?></div>
				<div class="controls"><?php echo $this->form->getInput('description'); ?></div>
			</div>											
			<div class="control-group">
				<div class="control-label"><?php echo $this->form->getLabel('address'); ?></div>
				<div class="controls"><?php echo $this->form->getInput('address'); ?></div>
			</div>								
			<div class="control-group">
				<div class="control-label"><?php echo $this->form->getLabel('description'); ?></div>
				<div class="controls"><?php echo $this->form->getInput('description'); ?></div>
			</div>
			<div class="control-group">
				<div class="control-label"><?php echo $this->form->getLabel('zipcode'); ?></div>
				<div class="controls"><?php echo $this->form->getInput('zipcode'); ?></div>
			</div>	
			<div class="control-group">
				<div class="control-label"><?php echo $this->form->getLabel('city'); ?></div>
				<div class="controls"><?php echo $this->form->getInput('city'); ?></div>
			</div>
			<div class="control-group">
				<div class="control-label"><?php echo $this->form->getLabel('states'); ?></div>
				<div class="controls"><?php echo $this->form->getInput('states'); ?></div>
			</div>	
			
		</div>
	</div>
		
</form>

